<template>
  <svg class="icon" aria-hidden="true">
    <use :xlink:href="iconName"></use>
  </svg>
</template>

<script>
export default {
  props:['itemType'],
  data() {
    return {
      iconType: {
        ["Windows"]: "#icon-Windows",
        ["Linux"]: "#icon-linux",
        ["Oracle"]: "#icon-oracle",
        ["Mysql"]: "#icon-mysql",
        ["SQLServer"]: "#icon-sql_server",
        ["Network"]: "#icon-jiaohuanji",
        ["AIX"]: "#icon-linux",
        ["Monitor"]: "#icon-jiankongshebei",
      },
    };
  },
  computed:{
    iconName(){
      return this.iconType[this.itemType]
    }
  },
};
</script>

<style lang="scss" scoped>
.icon {
  width: 40px;
  height: 40px;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>
